package com.liuhouse.controller;

import com.liuhouse.annotation.LinkMe;
import com.liuhouse.service.ILinkService;
import com.liuhouse.utils.ResponseResult;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/link")
@Api(tags = "链接相关接口信息" , description = "友情链接接口描述")
public class LinkController {

    @Resource
    private ILinkService linkService;


    /**
     * 获取所有的已经审核通过的友情链接
     * ResponseResult是我们在liuhouse-framework工程里面写的实体类
     * @return
     */
    @GetMapping("/getAllLink")
    @LinkMe(info = "友情链接,记得联系我")
    public ResponseResult getAllLink(){
        return linkService.getAllLink();
    }

}
